package com.cims.dao.user;

import com.cims.common.vo.User;
import com.cims.dao.hibernate.HibernateUtil;

public class UserDAOImpl implements UserDAO{

	@Override
	public boolean authenticateUser(String username, String password){

		if(HibernateUtil.findOne(User.class, "from User where username='" + username + "' and password='" + password + "'") != null){
			return true;
		}else{
			return false;
		}
	}

	@Override
	public User getUserDetail(String username){
		return HibernateUtil.findOne(User.class, "from User where username='" + username + "'");
	}

}
